<html>
<head>
	<meta charset="UTF-8">
	<title>zhuce</title>
	<LINK href="css/common.css" type="text/css" rel="stylesheet">
	<script src="js/jquery-1.9.1.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(function () {
		 var state = false;
		 $('#txtEmail').focus(function () {
			 if (state == false) {
				 $(this).val('');
			 }
		})
		$('#txtEmail').blur(function () {
                 if ($(this).val() == '') {
                     $('#spinfo').text('邮箱不能为空');
                     $(this).focus();
                 }else {
                     if (/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test($(this).val()) == false) {


                         $('#spinfo').text('邮箱格式不正确，请重新输入');
                         $(this).focus();
                     }else {
                         //$('#spinfo').text('邮箱格式正确，继续输入');
                         $('#spinfo').text('');
                         $('#spinfo').append('<img src=images/onSuccess.gif/>');
                         state = true;
                     }
				}
             })
         })
     </script>
</head>
<body>
	<div id="header">
		注册
	</div>
	<div id="main">
	<!--
	用jq判断用户名称是否合理。
	判断密码是否有6位
	-->
		<form action="reg.php" method="POST">
			<p>请输入用户信箱<input type="text" name="usermail" id="txtEmail"></p>
			<p>请输入用户昵称<input type="text" name="username"></p>
			<p>请输入密码<input type="password" name="userpassword"></p>
			<p>请再次输入密码<input type="password" name="userpassword"></p>
		</form>
	</div>
	<div id="footer">
		@copyright by beginmaker.com
	</div>
</body>
</html>